fix(aws-strands): lower Python floor to 3.10 - #2285
Conversation
The ag_ui_strands package required Python >=3.12, which blocked users whose environments are pinned to 3.10 and forced them to patch the package locally. Nothing in the adapter actually needs 3.11+ syntax or stdlib: the only modern constructs are PEP 604 unions (3.10+), and every dependency already supports 3.10 (strands-agents >=3.10, ag-ui-a2ui-toolkit >=3.10, ag-ui-protocol >=3.9). The package README already advertised "Python 3.10+", so this also resolves that inconsistency. - pyproject.toml: requires-python = ">=3.10, <3.14" - examples/pyproject.toml: python = "<3.14,>=3.10" - examples/README.md: state the supported range as 3.10 - 3.13 - uv.lock: regenerate; adds the 3.10 backports (exceptiongroup, tomli, backports-asyncio-runner) behind python_full_version markers Regenerating the lock also picks up ag-ui-a2ui-toolkit 0.0.4, which the committed pyproject already required but the lock still pinned at 0.0.3. Verified on CPython 3.10.20: uv sync --frozen resolves and installs, the package imports, the full test suite passes (176 passed, 2 skipped), the example server imports, and the built wheel reports Requires-Python: <3.14,>=3.10. Fixes ag-ui-protocol#2282
|
Hi @ranst91 , sorry for the tag. Would appreciate a review. This will unblock us! |
|
Is there even still a reason for |
|
haven't checked for versions above 3.14, but the library builds and runs fine for 3.10. |
|
@contextablemark Sorry for the tag! requesting review to unblock myself 🙇🏼 |
Python Preview PackagesVersion
Install with uvAdd the TestPyPI index to your [[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = trueThen install the packages you need: # Core SDK
uv add 'ag-ui-protocol==0.0.0.dev1785367292' --index testpypi
# Integrations (each already depends on the matching ag-ui-protocol preview)
uv add 'ag-ui-langgraph==0.0.0.dev1785367292' --index testpypi
uv add 'ag-ui-crewai==0.0.0.dev1785367292' --index testpypi
# NOTE: ag-ui-agent-spec depends on pyagentspec (git-only, not on PyPI).
# You will need to install pyagentspec separately from its git repo.
uv add 'ag-ui-agent-spec==0.0.0.dev1785367292' --index testpypi
uv add 'ag_ui_adk==0.0.0.dev1785367292' --index testpypi
uv add 'ag_ui_strands==0.0.0.dev1785367292' --index testpypiInstall with pippip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
ag-ui-protocol==0.0.0.dev1785367292
Commit: 38c2e3a |
@ag-ui/a2a-middleware
@ag-ui/a2ui-middleware
@ag-ui/event-throttle-middleware
@ag-ui/mcp-apps-middleware
@ag-ui/mcp-middleware
@ag-ui/a2a
@ag-ui/adk
@ag-ui/ag2
@ag-ui/agno
@ag-ui/aws-strands
@ag-ui/claude-agent-sdk
@ag-ui/claude-managed-agents
@ag-ui/crewai
@ag-ui/langchain
@ag-ui/langgraph
@ag-ui/llamaindex
@ag-ui/mastra
@ag-ui/pydantic-ai
@ag-ui/vercel-ai-sdk
@ag-ui/watsonx
@ag-ui/a2ui-toolkit
create-ag-ui-app
@ag-ui/client
@ag-ui/core
@ag-ui/encoder
@ag-ui/proto
commit: |
contextablemark
left a comment
There was a problem hiding this comment.
looks good. merging.
ag_ui_strands declares requires-python = ">=3.12, <3.14", which blocks Python 3.14 even though nothing in the package or its dependency tree needs the cap. All direct dependencies already support 3.14 (strands-agents, ag-ui-protocol, fastapi have no upper bound; ag-ui-a2ui-toolkit is <3.15). Verified on CPython 3.14.6: - uv sync --python 3.14 --all-groups resolves and installs cleanly - import ag_ui_strands loads all 20 public exports - pytest tests/ - 176 passed, 2 skipped (same counts as the 3.10 floor verification in ag-ui-protocol#2285) - poetry install in examples/ on 3.14 resolves and installs; the demo server module imports fully (only fails at model-construction time on a missing API key, unrelated to Python version) - uv build - wheel reports Requires-Python: <3.15,>=3.12
|
I have rebased #2293 |
ag_ui_strands declares requires-python = ">=3.10, <3.14", which blocks Python 3.14 even though nothing in the package or its dependency tree needs the cap. All direct dependencies already support 3.14 (strands-agents, ag-ui-protocol, fastapi have no upper bound; ag-ui-a2ui-toolkit is <3.15). Verified on CPython 3.14.6: - uv sync --python 3.14 --all-groups resolves and installs cleanly - import ag_ui_strands loads all 20 public exports - pytest tests/ - 176 passed, 2 skipped (same counts as the 3.10 floor verification in ag-ui-protocol#2285) - poetry install in examples/ on 3.14 resolves and installs; the demo server module imports fully (only fails at model-construction time on a missing API key, unrelated to Python version) - uv build - wheel reports Requires-Python: <3.15,>=3.10
Fixes #2282
Problem
ag_ui_strandsdeclaresrequires-python = ">=3.12, <3.14", which blocks environments pinned to Python 3.10. As reported in #2282, users currently have to patch the package locally to install it.Notably the package README has advertised
- Python 3.10+under Prerequisites since the integration first landed in #675 — the same commit that set the floor to>=3.12. So the documented contract and the enforced metadata have disagreed from the start; this PR makes the metadata match the promise.Why 3.10 is safe
Nothing in the adapter needs 3.11+:
src/,tests/, andexamples/parses withast.parse(..., feature_version=(3, 10)). The only modern constructs are PEP 604 unions (X | None), which are 3.10+ at runtime. Nomatchstatements,StrEnum,TaskGroup,ExceptionGroup/except*,itertools.batched,typing.Self,@override,datetime.UTC, ortomllib.strands-agentsis>=3.10(classified 3.10–3.13),ag-ui-a2ui-toolkitis>=3.10,<3.15,ag-ui-protocolis>=3.9. Sibling integrations in this repo are already on 3.10 (langgraph,adk-middleware,agent-spec,langroid,crew-ai), so aws-strands was the outlier.Changes
pyproject.toml—requires-python = ">=3.10, <3.14"examples/pyproject.toml—python = "<3.14,>=3.10"examples/README.md— supported range now reads 3.10 – 3.13uv.lock— regenerated; adds 3.10 backports (exceptiongroup,tomli,backports-asyncio-runner) behindpython_full_version < '3.11'markersOne incidental fix: regenerating the lock also moves
ag-ui-a2ui-toolkit0.0.3 → 0.0.4. The committedpyproject.tomlalready required>=0.0.4while the lock still pinned 0.0.3, souv lock --checkwas failing onmainbefore this PR. Happy to split that out if you'd prefer it separate.The upper bound
<3.14is unchanged — this only lowers the floor.Verification (CPython 3.10.20)
uv sync --python 3.10 --frozen --all-groups— resolves and installsimport ag_ui_strands— all 20 public exports loadpytest tests/— 176 passed, 2 skippedpoetry installinexamples/on a 3.10 interpreter, thenimport server.__main__— OKuv build— built wheel reportsRequires-Python: <3.14,>=3.10No CI changes needed: no workflow pins a Python version for this package, and
build-python-previewonly runsuv build.